import type { AuditedEntityDto, CreationAuditedEntityDto } from '@abp/ng.core';

export interface AllocateDto extends AuditedEntityDto<string> {
  allocateCode?: string;
  documentStatus: number;
  transferDate?: string;
  vendor?: string;
  allocationSector?: string;
  transferor?: string;
  transfersAmount: number;
  allocateAmount: number;
  phone?: string;
  allocateName?: string;
}

export interface ApprovalHistoryDto extends CreationAuditedEntityDto<string> {
  inboundManageId?: string;
  operationType?: string;
  approvalResult?: string;
  approvalComment?: string;
  operatorName?: string;
}

export interface CreateUpdateAllocateDto {
  allocateCode: string;
  documentStatus: number;
  transferDate: string;
  vendor: string;
  allocationSector: string;
  transferor: string;
  transfersAmount: number;
  allocateAmount: number;
  phone?: string;
  allocateName?: string;
}

export interface CreateUpdateInboundDetailDto {
  id?: string;
  productId?: string;
  productName?: string;
  productCode?: string;
  productType?: string;
  model?: string;
  unit?: string;
  location?: string;
  unitPrice: number;
  quantity: number;
  amount: number;
  stockBefore: number;
  stockAfter: number;
  batchNumber?: string;
  productionDate?: string;
  remarks?: string;
}

export interface CreateUpdateInboundManageDTO {
  inboundOrderNumber: string;
  inboundType: string;
  state: number;
  inboundDate?: string;
  warehouseName: string;
  inboundGood: string;
  attn: string;
  inboundQuantity: number;
  inboundAmount: number;
  makeSingle: string;
  makeSingleTime: string;
  reviewers?: string;
  reviewTime?: string;
  details: CreateUpdateInboundDetailDto[];
  relatedOrderNo?: string;
  supplierName?: string;
  contactPerson?: string;
  contactPhone?: string;
}

export interface CreateUpdateOutboundDetailDto {
  itemName?: string;
  itemNumber?: string;
  goodsType?: string;
  specificationsModels?: string;
  unit?: string;
  currentInventory: number;
  salesNumber: number;
  outboundQuantity: number;
  unshippedQuantity: number;
  outboundLocation?: string;
  currentOutboundQuantity: number;
  unitPrice: number;
  amountSale: number;
  lotNumber?: string;
  manufactureDate?: string;
  remark?: string;
}

export interface CreateUpdateOutboundManageDto {
  outboundNumber?: string;
  outboundType?: string;
  state: number;
  outboundDate?: string;
  repositoryName?: string;
  associatedTrackNumber?: string;
  customerName?: string;
  contact?: string;
  telephoneNumber?: string;
  outboundGoods?: string;
  outboundQuantity: number;
  outboundAmount: number;
  attn?: string;
  makeSingle?: string;
  preparationDate?: string;
  fileUpload?: string;
  details: CreateUpdateOutboundDetailDto[];
}

export interface CreateUpdatePurchaseOrderDto {
  purchaseNumner: string;
  documentStatus: number;
  arrivalDate: string;
  vendor: string;
  incomingGoodsDepartment: string;
  purchaser: string;
  goodsNumber: number;
  amountPurchase: number;
  phone?: string;
  purchaseOrderName?: string;
}

export interface CreateUpdateReturnOrderDto {
  returnOrderNumber: string;
  documentStatus: number;
  returnDate: string;
  returners: string;
  returnsDepartment: string;
  returnee: string;
  returnsNumber: number;
  returnAmount: number;
  phone?: string;
  returnOrderName?: string;
}

export interface FileDto {
  name?: string;
  url?: string;
  size: number;
}

export interface InboundDetailDto extends AuditedEntityDto<string> {
  id?: string;
  inboundManageId?: string;
  productName?: string;
  productCode?: string;
  productType?: string;
  model?: string;
  unit?: string;
  location?: string;
  unitPrice: number;
  quantity: number;
  amount: number;
  stockBefore: number;
  stockAfter: number;
  batchNumber?: string;
  productionDate?: string;
  remarks?: string;
}

export interface InboundManageDTO {
  inboundOrderNumber?: string;
  inboundType?: string;
  state: number;
  inboundDate?: string;
  warehouseName?: string;
  inboundGood?: string;
  attn?: string;
  inboundQuantity: number;
  inboundAmount: number;
  makeSingle?: string;
  makeSingleTime?: string;
  reviewers?: string;
  reviewTime?: string;
  id?: string;
  details: InboundDetailDto[];
  relatedOrderNo?: string;
  supplierName?: string;
  contactPerson?: string;
  contactPhone?: string;
}

export interface InboundOperationLogDto extends CreationAuditedEntityDto<string> {
  operatorName?: string;
  operationType?: string;
  description?: string;
  inboundManageId?: string;
}

export interface OutboundDetailDto extends AuditedEntityDto<string> {
  itemName?: string;
  itemNumber?: string;
  goodsType?: string;
  specificationsModels?: string;
  unit?: string;
  currentInventory: number;
  salesNumber: number;
  outboundQuantity: number;
  unshippedQuantity: number;
  outboundLocation?: string;
  currentOutboundQuantity: number;
  unitPrice: number;
  amountSale: number;
  lotNumber?: string;
  manufactureDate?: string;
  remark?: string;
}

export interface OutboundManageDto extends AuditedEntityDto<string> {
  outboundNumber?: string;
  outboundType?: string;
  state: number;
  outboundDate?: string;
  repositoryName?: string;
  associatedTrackNumber?: string;
  customerName?: string;
  contact?: string;
  telephoneNumber?: string;
  outboundGoods?: string;
  outboundQuantity: number;
  outboundAmount: number;
  attn?: string;
  makeSingle?: string;
  preparationDate?: string;
  details: OutboundDetailDto[];
  files: FileDto[];
}

export interface PurchaseOrderDto extends AuditedEntityDto<string> {
  purchaseNumner?: string;
  documentStatus: number;
  arrivalDate?: string;
  vendor?: string;
  incomingGoodsDepartment?: string;
  purchaser?: string;
  goodsNumber: number;
  amountPurchase: number;
  phone?: string;
  purchaseOrderName?: string;
}

export interface ReturnOrderDto extends AuditedEntityDto<string> {
  returnOrderNumber?: string;
  documentStatus: number;
  returnDate?: string;
  returners?: string;
  returnsDepartment?: string;
  returnee?: string;
  returnsNumber: number;
  returnAmount: number;
  phone?: string;
  returnOrderName?: string;
}
